<!DOCTYPE html>
<html lang="en">
<head>
<?php 
    if(isset($head_extension))
        echo $head_extension;
?>
	<meta charset="utf-8">
	<title>Eduleaks</title>

	<style type="text/css">

	::selection{ background-color: #E13300; color: white; }
	::moz-selection{ background-color: #E13300; color: white; }
	::webkit-selection{ background-color: #E13300; color: white; }

	body {
		background-color: #fff;
		margin: 40px;
		font: 13px/20px normal Helvetica, Arial, sans-serif;
		color: #4F5155;
	}

	a {
		color: #003399;
		background-color: transparent;
		font-weight: normal;
	}

        div #header
        {
		background-color: transparent;
		border-bottom: 1px solid #D0D0D0;
		font-weight: normal;
		margin: 0 0 14px 0;
		padding: 14px 15px 10px 15px;
            
        }
	h1 {
                display: inline;
		color: #444;
		font-size: 19px;
	}

	code {
		font-family: Consolas, Monaco, Courier New, Courier, monospace;
		font-size: 12px;
		background-color: #f9f9f9;
		border: 1px solid #D0D0D0;
		color: #002166;
		display: block;
		margin: 14px 0 14px 0;
		padding: 12px 10px 12px 10px;
	}

        #sidebar  
        {
            border-right: 1px solid #D0D0D0;                      
        }
        
	#body{
		margin: 0 15px 0 15px;
	}
	
	p.footer{
		text-align: right;
		font-size: 11px;
		border-top: 1px solid #D0D0D0;
		line-height: 32px;
		padding: 0 10px 0 10px;
		margin: 20px 0 0 0;
	}
	
        table.profile
        {
            margin-left: 10px;
            margin-right: 10px;
            border: 1px solid #D0D0D0;
        }
        table.profile tr td 
        {
            padding-left: 5px;
            padding-right: 5px;
        }
        
	#container{
		margin: 10px;
		border: 1px solid #D0D0D0;
		-webkit-box-shadow: 0 0 8px #D0D0D0;
	}
        ol.horizontal {
            text-align: right;
            display: inline;
        }      

        ol.horizontal li {
            display: inline;
            padding-right: 20px;
            padding-left: 10px;
            border-right: 0px;
        }
	</style>
</head>
<body>

<div id="container">
    <div id="header">
        <table width="100%">
            <tr>
                <td width="33%"><h1><a href="<?php echo base_url(); ?>">Eduleaks</a></h1> </td>

                <?php 
                    echo '<td width="33%"><ol class="horizontal">';
                    echo '<li>';
                    echo form_open('search/query');                  
                    echo '<table width="200px">';                      
                    echo '<tr>';          
                    echo '<td>'.form_input('query_string', '').'</td>'; 
                    echo '<td>'.form_submit('mysubmit', 'Hae').'</td>';           
                    echo '</tr>';
                    echo '<tr><td>';
                    echo '<a href="'.site_url("search/query/").'">Tarkennettu haku</a>';
                    echo '</tr></td>';
                    echo '</table>';
                    echo form_close();
                    echo '</li>';
                    echo '</ol></td>';
                    echo '<td width="33%"  align="right">';    
                    echo '<ol class="horizontal">';
                    if($this->session->userdata('logged_in')) {
                        echo '<li>Kirjautuneena: ' . $this->session->userdata('user_name') . '</li>';
                        echo '<li><a href="'.site_url("profile/logout/").'">Kirjaudu ulos</a></li>';
                        echo '<li><a href="'.site_url("media/create/").'">Lataa uusi video</a></li>';
                    } else {
                        echo '<li><a href="'.site_url("profile/create/").'">Rekisteröidy</a></li>';
                        echo '<li><a href="'.site_url("profile/login/").'">Kirjaudu sisään</a></li>';
                    }
                    echo '</ol></td>';
                ?>
            </tr>
        </table>
    </div>
        
